﻿Public Partial Class Principal
    Inherits System.Web.UI.MasterPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session.Item("NomUsuario") = "" Then
            Response.Clear()
            Response.Redirect("~/Login.aspx")
        End If
        LblUsuario.Text = Session.Item("NomUsuario")
        LblSistema.Text = Session.Item("Sistema")
    End Sub


    Protected Sub LnkCerrar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LnkCerrar.Click
        Session.Abandon()
        FormsAuthentication.SignOut()
        Response.Redirect("Login.aspx")
    End Sub

End Class